const url = require('url');

let obj = url.parse('http://www.gary23.cn:8080?rsv_n=2&rsv_sug=21&rsv_sug1=16&rsv_sug7=100', true);

console.log(obj);
/**
Url {
	protocol: 'http:',
	slashes: true,
	auth: null,
	host: 'www.gary23.cn:8080',
	port: '8080',
	hostname: 'www.gary23.cn',
	hash: null,
	search: '?rsv_n=2&rsv_sug=21&rsv_sug1=16&rsv_sug7=100',
	query: { rsv_n: '2', rsv_sug: '21', rsv_sug1: '16', rsv_sug7: '100' },
	pathname: '/',
	path: '/?rsv_n=2&rsv_sug=21&rsv_sug1=16&rsv_sug7=100',
    href: 'http://www.gary23.cn:8080/?rsv_n=2&rsv_sug=21&rsv_sug1=16&rsv_sug7=100'
}
 */